package lab02.Test05;

public class Cubic {
    //属性:长宽高
    private float length;
    private float width;
    private float height;
    //初始化
public Cubic(float l,float w,float h ){
    this.setLength(l);
    this.setWidth(w );
    this.setHeight(h);
}
public float V(){
    float vm;
    vm=length*width*length;
    return vm;

}
//函数

    public float getLength() {
        return length;
    }

    public void setLength(float length) {
        this.length = length;
    }

    public float getWidth() {
        return width;
    }

    public void setWidth(float width) {
        this.width = width;
    }

    public float getHeight() {
        return height;
    }

    public void setHeight(float height) {
        this.height = height;
    }
}
